import express from 'express';
const app = express();
const figlet = require('figlet');

app.use(require('cors')());
app.use(express.json());
app.use(express.urlencoded({ extended: false }));

app.use(require('./router/index'));
app.listen(process.env.PORT!, () => {
	import('./timedTask/index');
	figlet('GitCommit', function (_err: Error, data: string) {
		console.log(data);
		console.log(`GitCommit | 项目端口:${process.env.PORT} | WS端口:${process.env.WS_PORT} | 已开启自动提交.
可视化地址:http://localhost:${process.env.PORT}/vue`);
	});
});
